package com.example.demoes.mapper;

import com.example.demoes.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper extends ElasticsearchRepository<User,String> {

    List<User> findByAddressLikeIgnoreCase(String address);

    Page<User> findByUsernameContaining(String username, Pageable page);

}
